<template>
  <div>
    Test2{{ num }}
    <button @click="changeNum">加</button>
  </div>
</template>
<script setup>
import {defineProps, defineEmits} from 'vue';

defineProps({
  num: Number
});
const emit = defineEmits(["changeNum"]);
const changeNum = () => {
  emit("changeNum");
}
</script>
